#include "sort.h"

void BubbleSorttest()
{
	int a[] = { 2,4,6,8,0,1,3,5,7,9 };
	int sz = sizeof(a) / sizeof(a[0]);

	for (int i = 0; i < sz; i++)
	{
		printf("%d ", a[i]);
	}
	printf("\n");

	BubbleSort(a, sz);
	for (int i = 0; i < sz; i++)
	{
		printf("%d ", a[i]);
	}
	printf("\n");
}

void QuickSortTest()
{
	int a[] = { 6,1,2,7,9,3,4,5,10,8 };
	int sz = sizeof(a) / sizeof(a[0]);
	for (int i = 0; i < sz; i++)
	{
		//a[i] = rand() % 100 + 1;
		printf("%d ", a[i]);
	}
	printf("\n");
	QuickSortNonR(a, 0, sz - 1);
	for (int i = 0; i < sz; i++) 
	{
		printf("%d ", a[i]);
	}
	printf("\n");
}

int main()
{
	srand((unsigned)time(0));
	QuickSortTest();

	return 0;
}